package com.javarush.test.level04.lesson06.task03;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * Created by IntelliJ IDEA.
 * User: Andry
 * Date: 03.02.13
 * Time: 2:31
 * To change this template use File | Settings | File Templates.
 */
public class Solution
{
    public static void main(String[] args) throws Exception
    {
        //Напишите тут ваш код
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        String sValue1 = reader.readLine();
        String sValue2 = reader.readLine();
        String sValue3 = reader.readLine();

        int value1 = Integer.parseInt(sValue1);
        int value2 = Integer.parseInt(sValue2);
        int value3 = Integer.parseInt(sValue3);

        if (value1 > value2 && value1 > value3)
        {
            System.out.println(value1);
            if (value2 > value3)
            {
                System.out.println(value2);
                System.out.println(value3);
            }
            else
            {
                System.out.println(value3);
                System.out.println(value2);
            }
        }

        else if (value2 > value1 && value2 > value3)
        {
            System.out.println(value2);
            if (value1 > value3)
            {
                System.out.println(value1);
                System.out.println(value3);
            }
            else
            {
                System.out.println(value3);
                System.out.println(value1);
            }
        }
        else if (value3 > value1 && value3 > value2)
        {
            System.out.println(value3);
            if (value1 > value2)
            {
                System.out.println(value1);
                System.out.println(value2);
            }
            else
            {
                System.out.println(value2);
                System.out.println(value1);
            }
        }
    }
}
